import prompt from '@ohos.prompt';
import router from '@system.router';

export default {
    data: {
        minHumidity: "32.2",
        maxHumidity: "60.0",
        minP2: "10",
        maxP2: "30",
        minP10: "20",
        maxP10: "60",
        minPA: "0.01",
        maxPA: "0.03",
    },
    back() {
        router.back()
    },
    confirm() {
        prompt.showToast({
            message: "设置成功",
        })
        this.back()
    },
    getMinHum(e) {
        this.minHumidity = e.value
    },
    getMaxHum(e) {
        this.maxHumidity = e.value
    },
    getMinP2(e) {
        this.minP2 = e.value
    },
    getMaxP2(e) {
        this.maxP2 = e.value
    },
    getMinP10(e) {
        this.minP10 = e.value
    },
    getMaxP10(e) {
        this.maxP10 = e.value
    },
    getMinPA(e) {
        this.minPA = e.value
    },
    getMaxPA(e) {
        this.maxPA = e.value
    },
    send_num() {
        let str = this.minHumidity +
        this.maxHumidity +
        this.minP2 +
        this.maxP2 +
        this.minP10 +
        this.maxP10 +
        this.minPA +
        this.maxPA;
        this.$app.$def.g_tcp.send({
            data: str
        })
    }
}
